define(['jquery'],function($){
	(function gifLoop(){
		//imgslider
	 	$(".flexslider").flexslider({
			animation: "slide",
			smoothHeight : true,
			slideshowSpeed: 10000,
			directionNav: false,
			controlNav: true,
			rtl: false
		});
		var length=$(".gifLoop").length;
		var re=/^.+\?(.+)$/
		setInterval(function(){
			var myDate=new Date();
			var second=myDate.getSeconds();
			for(var j=0;j<length;j++){
				var tempSrc=$(".gifLoop").eq(j).attr('src');
				if(re.test(tempSrc)){
					tempSrc.replace(re.exec(tempSrc)[1],second);
				}
				else{
					tempSrc+="?"+second;
				}
				$(".gifLoop").eq(j).attr('src',tempSrc);
			}
		},5000)
	})()
})